IF EXISTS ( SELECT  *
            FROM    dbo.sysobjects
            WHERE   id = OBJECT_ID(N'[CGO_GameGetPackage]')
                    AND OBJECTPROPERTY(id, N'IsProcedure') = 1 ) 
  DROP PROCEDURE CGO_GameGetPackage
GO

SET QUOTED_IDENTIFIER ON
SET ANSI_NULLS ON
GO


CREATE PROCEDURE dbo.CGO_GameGetPackage 
  @PackageID INT
AS 
  SELECT  dbo.CGO_Game.GameID ,
          dbo.CGO_Game.Name AS GameName ,
          Packages.*
  FROM    dbo.Packages
          INNER JOIN dbo.CGO_Game ON dbo.Packages.Name = dbo.CGO_Game.PackageName
  WHERE   PackageID = @PackageID
GO